clear
addpath '..\common'

%波形信息: FS = 390.625M ,startIdx 803363, stopIdx 2578995
fs = 390.625e6;
startIdx = 803363;
stopIdx = 2578995;
iqpath = '.\data\Case24_MU_BW160_MCS13_longburst.float';
[iq_data, iq_info] = rm.rfutils.load_iq(iqpath, 'float32', startIdx*8, stopIdx-startIdx);
disp(iq_info);
%rm.rfsa.waveform(iq_data, fs);
rm.rfsa.spectrum(iq_data, fs, true);

% 使用时域均衡器（如LMS算法）
lineeq = comm.LinearEqualizer('Algorithm','LMS', 'NumTaps',15, 'StepSize',0.01);  % 15抽头LMS均衡器
A_compensated = equalize(eq, B_output, A_original(1:1000));  % 使用训练序列
